simstekfandomcom-20200214-history
SKEL
Skeletons specify the network of bones that can be moved by an animation to bend the applied meshes of a rendered character. Skeletons also provide non-animated default translation and rotation values for each bone, for convenient editing in 3DS Max by the artists of Maxis, which are used only for Create-a-Sim (in both games) and character pages. Skeletons follow the following format: * Version - A 4-byte unsigned integer specifying the version number of this skeleton file; should be equal to 1 * Name - A Pascal string specifying the name of this skeleton; should be the same as the filename but without the .skel extension * Bone count - A 2-byte unsigned integer specifying the number of bones that make up this skeleton For each bone: * Unknown - A 4-byte unsigned integer set to 1 * Name - A Pascal string specifying the name of this bone * Parent's name - A Pascal string specifying the name of the parent bone which this bone is directly attached to; the parent is more proximal than the child. The ROOT bone acts as the center of gravity. The parent of the ROOT bone is "NULL", which means "no bone". * Has property list - A 1-byte unsigned integer specifying whether or not a property list is defined with this bone * Property list - If Has property list is set: :* Property count - A 4-byte unsigned integer specifying the number of properties in this property list :* Properties - For each property: ::* Pair count - A 4-byte unsigned integer specifying the number of key/value pairs in this property ::* Key/value pairs - As many pairs as defined by the previous field. A pair is made up of a key Pascal string followed by a value Pascal string. :Note: A property list is two dimensional; there can be any number of properties, each with any number of key/value pairs. :Note: The adult skeleton has only one key/value pair, on one property on one bone: the PELVIS has a key "name" with the value "adult". * Translation - X,Y,Z coordinates, each a 32-bit little-endian float, specifying the distance from the joint with the parent to the distal end of this bone after the default rotation has been applied * Rotation - A normalized quaternion (called a "versor") consisting of X,Y,Z,W coordinates, each a 32-bit little-endian float, specifying the default rotation of this bone to be applied after translation. These values assume a left-handed coordinate system, meaning that for a right-handed coordinate system (like OpenGL and XNA), you have to mirror the quaternion by negating Y and Z. * Can translate - A 4-byte integer specifying whether or not this bone can be translated by an animation * Can rotate - A 4-byte integer specifying whether or not this bone can be rotated by an animation * Can blend - A 4-byte integer specifying whether or not this bone can blend (exact meaning unclear, at the moment) * Wiggle value - A 32-bit float in little-endian byte order; not used * Wiggle power - A 32-bit float in little-endian byte order; not used :Don Hopkins says the Wiggle parameters are left over from an attempt to use Perlin noise to introduce some randomness into the animations, so that an animation would look a little different each time it was run.